package code3;

import java.util.Random;

public abstract class AbstractVehicle implements Vehicle {

	public static Vehicle getVehicle() {
		Random random = new Random();
		int suiji = random.nextInt(10) + 1;
		if (suiji == 9 || suiji == 10) {
			return new Plane();
		} else if (suiji >= 5 && suiji <= 8) {
			return new Train();
		}
		return new Tuola();
	}
}
